﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DynamicPopulateExt.aspx.cs" Inherits="AjaxToolkitDemo.SynamicPopulateExt" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function updateGrid(value) {
            var behavior = $find('dyp1');
            if (behavior)
                behavior.populate(value);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <cc1:DynamicPopulateExtender ID="dyp1" runat="server"
         TargetControlID="Panel1" ServiceMethod="GetDynamicContent">
        </cc1:DynamicPopulateExtender>
        <ul>
        <li><a onclick="updateGrid(1);return false;" href="#">Custmers</a></li>
        <li><a onclick="updateGrid(2);return false;" href="#">Employees</a></li>
        <li><a onclick="updateGrid(3);return false;" href="#">Products</a></li>
        </ul>
        <asp:Panel ID="Panel1" runat="server">
        </asp:Panel>
    
    </div>
    </form>
</body>
</html>
